package com.itheima.convertstream;

import java.io.*;
import java.nio.charset.Charset;

public class ConvertStreamDemo2 {
    public static void main(String[] args) throws IOException {
        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("day29-code\\c.txt"),"GBK");
        osw.write("爱你哟");
        osw.close();

        FileWriter fw = new FileWriter("day29-code\\d.txt", Charset.forName("GBK"));
        fw.write("想你哟");
        fw.close();
    }
}
